<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>

<form:form commandName="taskjob" cssClass="form-horizontal" role="form" onsubmit="return false;">
    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right" for="taskName">*任务标题</label>
        <div class="col-sm-4">
            <input type="text" name="taskName" id="taskName" placeholder="任务名称" value="${taskjob.taskName}"
                   class="form-control " readonly="readonly">
        </div>
        <label class="col-sm-2 control-label no-padding-right" for="taskType">*事项类型</label>
        <div class="col-sm-4">
            <select name="taskType" id="taskType" class="form-control" readonly="readonly">
                <option value="">${taskjob.taskType}</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right" for="taskContent">*内容事项</label>
        <div class="col-sm-10">
            <textarea rows="5" id="taskContent" name="taskContent" placeholder="任务内容" value="${taskjob.taskContent}"
                      class="form-control " readonly="readonly" required  style="resize: none;"/>
        </div>
    </div>
    <div class="form-group">
            <%-- <label class="col-sm-2 control-label no-padding-right" for="planStartDate">开始时间</label>
             <div class="col-sm-4">
                 <input type="text" name="planStartDate" id="planStartDate" placeholder="计划开始时间"
                        value="${taskjob.planStartDate}" class="form-control date-picker" required readonly>
             </div>--%>
        <label class="col-sm-2 control-label no-padding-right" for="planEndDate">办理时限</label>
        <div class="col-sm-4">
            <input type="text" name="planEndDate" id="planEndDate" placeholder="计划结束时间" value="${taskjob.planEndDate}"
                   class="form-control date-picker" readonly="readonly" required>
        </div>
        <label class="col-sm-2 control-label no-padding-right" for="resDept">承办单位</label>
        <div class="col-sm-4">
            <select name="resDept" id="resDept" class="form-control" readonly="readonly" required>
                <option value="${taskjob.resDept}">${taskjob.resDept}</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right" for="remindObj">抄送对象</label>
        <div class="col-sm-4">
            <select name="remindObj" id="remindObj" class="form-control" readonly="readonly">
                <option value="${taskjob.resDept}">${taskjob.resDept}</option>
            </select>
        </div>
            <%--    <label class="col-sm-2 control-label no-padding-right" for="remind-obj">抄送对象</label>
                <div class="col-sm-4">
                    <input type="text" name="remindObj" id="remind-obj" placeholder="抄送对象" value="${taskjob.remindObj}"
                           class="form-control ">
                </div>--%>
    </div>


    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right" for="groupList">督查组别</label>
        <div class="col-sm-4">
            <select name="groupList" id="groupList" class="form-control" readonly="readonly">
                <option value="${taskjob.groupName}">${taskjob.groupName}</option>

            </select>
        </div>
        <label class="col-sm-2 control-label no-padding-right" for="resUser">责任人</label>
        <div class="col-sm-4">
                <%--<input type="text" name="resUser" id="resUser" placeholder="责任人" value="${taskjob.resUser}"
                       class="form-control ">--%>
            <select name="resUser" id="resUser" class="form-control" readonly="readonly">
                <option value="${taskjob.resUser}">${taskjob.resUser}</option>
            </select>
        </div>
    </div>

    <div class="form-group">
    <label class="col-sm-2 control-label no-padding-right" for="operatorUser">经办人</label>
    <div class="col-sm-4">
            <%-- <input type="text" name="operatorUser" id="operatorUser" placeholder="经办人" value="${taskjob.operatorUser}"
                    class="form-control ">--%>
        <select name="operatorUser" id="operatorUser" class="form-control" readonly="readonly">
            <option value="${taskjob.operatorUser}">${taskjob.operatorUser}</option>

        </select>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right" for="fgLeader">分管领导</label>
        <div class="col-sm-4">
                <%--<input type="text" name="fgLeader" id="fgLeader" placeholder="分管领导" value="${taskjob.fgLeader}"
                       class="form-control ">--%>
            <select name="fgLeader" id="fgLeader" class="form-control" readonly="readonly">
                <option value="${taskjob.fgLeader}">${taskjob.fgLeader}</option>

                fgLeader
            </select>
        </div>
    </div>

    <%--<div class="form-group">
        <label class="col-sm-2 control-label no-padding-right">佐证材料</label>
        <input class="col-sm-4" type="file" id="fileupload" name="files"></input> <br>

        <button class="col-sm-4 btn btn-large btn-primary" id="btn-upload">上传</button>

        <input type="text" name="taxproof" id="taxproof_proof"
               value="${summaryFilter.taxproof}" class="form-control " style="display: none"/>
            &lt;%&ndash;   <input type="text" name="isaudit" id="isaudit_sta"
                      value="${summaryFilter.isaudit}" class="form-control " style="display: none"
               />
               <input type="text" name="teamClass" id="teamClass"
                      value="${summaryFilter.teamClass}" class="form-control " style="display: none"
               />
               <input type="text" name="datatime" id="datatime"
                      value="${summaryFilter.datatime}" class="form-control " style="display: none"
               />
               <input type="text" name="firstReportDate" id="firstReportDate"
                      value="${summaryFilter.firstReportDate}" class="form-control " style="display: none"
               />
               <input type="text" name="remark"
                      value="${summaryFilter.remark}" class="form-control " style="display: none"
               />
               <input type="text" id="sys-Id"
                      value="${summaryFilter.sysId}" class="form-control " style="display: none"
               />&ndash;%&gt;

    </div>--%>

    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right" for="task-situation-id">*落实单位</label>
        <div class="col-sm-4">
            <select name="deptCode" class="form-control " style="width: 100%"
                    data-placeholder="落实单位" id="task-situation-id">
                <option value="">请选择单位</option>
                    <%--<option value="${summaryFilter.teamId }">${summaryFilter.teamClass }</option>--%>
                <c:forEach items="${bookLists}" var="bookLists">
                    <option value="${bookLists.deptCode}">${bookLists.deptName}</option>
                </c:forEach>
            </select>
        </div>
        <label class="col-sm-2 control-label no-padding-right" for="task-depart-id">*落实人</label>
        <div class="col-sm-4">
            <select name="depart" class="form-control " style="width: 100%"
                    data-placeholder="落实人" id="task-depart-id">
                <option value="">请选择单位</option>
                    <%--<option value="${summaryFilter.teamId }">${summaryFilter.teamClass }</option>--%>
                <c:forEach items="${userLists}" var="userLists">
                    <option value="${userLists.departCode}">${userLists.departUser}</option>
                </c:forEach>
            </select>
        </div>

    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right" for="selectTime">选择日期</label>
        <div class="col-sm-4">
            <input id="selectTime" type="text" name="datatime" class="form-control date-upd date-picker" readonly
                   required/>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right" for="nowSituation">当前落实情况:</label>
        <div class="col-sm-10">
            <textarea rows="2" id="nowSituation" name="nowSituation" style="resize: vertical;min-height: 50px"
                      placeholder="当前落实情况"  <%--value="${taskJob.record}"--%> class="form-control "/>
        </div>
    </div>


    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right" for="problem">存在问题:</label>
        <div class="col-sm-10">
            <textarea rows="2" id="problem" name="problem" placeholder="存在问题"  <%--value="${taskJob.record}"--%>
                      class="form-control " style="resize: vertical;min-height: 50px"/>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right" for="nextPlan">下一步计划</label>
        <div class="col-sm-10">
            <textarea rows="2" id="nextPlan" name="nextPlan" placeholder="下一步计划" class="form-control " style="resize: vertical;min-height: 50px"/>
        </div>
    </div>


    <c:if test="${not empty situationList}">
        <div class="form-group">
            <label class="col-sm-2 control-label no-padding-right formsHead" for="taskContent">落实情况列表:</label>
        </div>
    </c:if>
    <c:forEach items="${situationList}" var="situation">
        <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right">时间</label>
            <div class="col-sm-3">
                <input type="text" value="${situation.datatime}" readonly="readonly"
                       placeholder="请输入时间" class="form-control ">
            </div>

            <label class="col-sm-1 control-label no-padding-right">落实单位</label>
            <div class="col-sm-3">
                <input type="text" value="${situation.deptName}" readonly="readonly"
                       placeholder="落实单位" class="form-control">
            </div>

            <label class="col-sm-1 control-label no-padding-right" for="task-situation-id">落实人</label>
            <div class="col-sm-3">
                <input type="text" placeholder="落实人" readonly="readonly" value="${situation.departUser}"
                       class="form-control ">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label no-padding-right">当前落实情况</label>
            <div class="col-sm-10">
                <textarea rows="2" class="form-control" placeholder="当前落实情况"
                          readonly="readonly">${situation.nowSituation}</textarea>
            </div>

        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label no-padding-right">存在问题</label>
            <div class="col-sm-10">
            <textarea rows="2" class="form-control" placeholder="存在问题"
                      readonly="readonly" >${situation.problem}</textarea>

            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label no-padding-right">存在问题</label>
            <div class="col-sm-10">
                <textarea rows="2" class="form-control" placeholder="下一步计划"
                          readonly="readonly">${situation.nextPlan}</textarea>

            </div>
        </div>

        <%--
                <div class="form-group">
                    <label class="col-sm-1 control-label no-padding-right">存在问题</label>
                    <div class="col-sm-5">
                        <textarea rows="2" class="form-control" placeholder="存在问题" value="${situation.problem}"
                                  readonly="readonly"/>
                    </div>
                    <label class="col-sm-1 control-label no-padding-right" for="task-situation-id">下一步计划</label>
                    <div class="col-sm-5">

                    </div>
                </div>--%>
        <hr width="100%;height:2px;">
    </c:forEach>

    <%--&lt;%&ndash;下载&ndash;%&gt;
    <input type="text" name="taxproof" id="taxproof_proof" hidden>--%>
    <form:hidden path="sysId"/>
</form:form>


<script type="text/javascript">
    jQuery(function ($) {
        $('.date-picker').datepicker({
            inline: true,
            format: "yyyymmdd",
            autoclose: true,
            todayHighlight: true,
            language: 'cn'
        }).next().on(ace.click_event, function () {
            $(this).prev().focus();
        });
    });
</script>